
//require('amazeui/dist/css/amazeui.css')
require('amazeui')
require('./assets/css/app.css')
require('./assets/iconfont/iconfont')
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'

import io from './lib/io'
import storage from './lib/storage'
import moment from 'moment'

import util from './lib/util'
Vue.use(util)

import VueUI from './components/base/VueUI'
import vueUIExtend from './components/base/vueUIExtend'



const Main = resolve => require(['./components/Main'], resolve)
const Index = resolve => require(['./components/Index'], resolve)
const NotFound = resolve => require(['./components/error/NotFound'], resolve)
const Login = resolve => require(['./components/login/Login'], resolve)
const Enroll = resolve => require(['./components/login/Enroll'], resolve)

const InvoiceMainPartList  = resolve => require(['./components/sysmanager/InvoiceMainPartList'], resolve)
const InvoiceMainPartForm  = resolve => require(['./components/sysmanager/InvoiceMainPartForm'], resolve)
const MeasureWhitelist  = resolve => require(['./components/measurement/MeasureWhitelist'], resolve)
const MeasureForm  = resolve => require(['./components/measurement/MeasureForm'], resolve)
const Measure  = resolve => require(['./components/measurement/Measure'], resolve)
const Paper  = resolve => require(['./components/measurement/Paper'], resolve)
const bingPaper  = resolve => require(['./components/measurement/bingPaper'], resolve)
const PaperForm  = resolve => require(['./components/measurement/PaperForm'], resolve)
const TopicForm  = resolve => require(['./components/measurement/TopicForm'], resolve)
const UserProfile = resolve => require(['./components/sysmanager/UserProfile'], resolve)
const UserList = resolve => require(['./components/sysmanager/UserList'], resolve)
const UserForm = resolve => require(['./components/sysmanager/UserForm'], resolve)
const UserRoles = resolve => require(['./components/sysmanager/UserRoles'], resolve)
const RoleList = resolve => require(['./components/sysmanager/RoleList'], resolve)
const RoleForm = resolve => require(['./components/sysmanager/RoleForm'], resolve)
const RoleUsers = resolve => require(['./components/sysmanager/RoleUsers'], resolve)
const RoleOptPermission = resolve => require(['./components/sysmanager/RoleOptPermission'], resolve)
const DataPermission = resolve => require(['./components/sysmanager/DataPermission'], resolve)
const AreaTeamList = resolve => require(['./components/sysmanager/AreaTeamList'], resolve)
const AreaTeamForm = resolve => require(['./components/sysmanager/AreaTeamForm'], resolve)
const BusTeamList = resolve => require(['./components/sysmanager/BusTeamList'], resolve)
const BusTeamForm = resolve => require(['./components/sysmanager/BusTeamForm'], resolve)
const PeriodList = resolve => require(['./components/sysmanager/PeriodList'], resolve)
const PeriodForm = resolve => require(['./components/sysmanager/PeriodForm'], resolve)
const ContinueApplySet = resolve => require(['./components/sysmanager/ContinueApplySet'], resolve)
const StartDaySetting = resolve => require(['./components/sysmanager/StartDaySetting'], resolve)
const StudentSchoolList = resolve => require(['./components/sysmanager/StudentSchoolList'], resolve)
const StudentSchoolForm = resolve => require(['./components/sysmanager/StudentSchoolForm'], resolve)
const ClassRemunerationList = resolve => require(['./components/sysmanager/ClassRemunerationList'], resolve)
const ClassRemunerationForm = resolve => require(['./components/sysmanager/ClassRemunerationForm'], resolve)
const CusIdList = resolve => require(['./components/sysmanager/CusIdList'], resolve)
const CusIdForm = resolve => require(['./components/sysmanager/CusIdForm'], resolve)
const SummerWinter = resolve => require(['./components/sysmanager/SummerWinter'], resolve)
const SummerWinterForm = resolve => require(['./components/sysmanager/SummerWinterForm'], resolve)


const TeacherList = resolve => require(['./components/teachingresource/TeacherList'], resolve)
const TeacherForm = resolve => require(['./components/teachingresource/TeacherForm'], resolve)

const CampusList = resolve => require(['./components/teachingresource/CampusList'], resolve)
const CampusForm = resolve => require(['./components/teachingresource/CampusForm'], resolve)

const CampusEditForm = resolve => require(['./components/teachingresource/CampusEditForm'], resolve)
const CampusAuditList = resolve => require(['./components/teachingresource/CampusAuditList'], resolve)





const RoomList = resolve => require(['./components/teachingresource/RoomList'], resolve)
const RoomForm = resolve => require(['./components/teachingresource/RoomForm'], resolve)


const RoomNewList = resolve => require(['./components/teachingresource/RoomNewList'], resolve)
const RoomNewForm = resolve => require(['./components/teachingresource/RoomNewForm'], resolve)


const CourseList = resolve => require(['./components/course/CourseList'], resolve)
const CourseForm = resolve => require(['./components/course/CourseForm'], resolve)
const CourseTypeList = resolve => require(['./components/course/CourseTypeList'], resolve)
const CourseTypeForm = resolve => require(['./components/course/CourseTypeForm'], resolve)
const ProductList = resolve => require(['./components/course/ProductList'], resolve)
const ProductForm = resolve => require(['./components/course/ProductForm'], resolve)
const ClassList = resolve => require(['./components/course/ClassList'], resolve)
const ClassForm = resolve => require(['./components/course/ClassForm'], resolve)
const ClassTimeList = resolve => require(['./components/course/ClassTimeList'], resolve)
const ClassRecommendList = resolve => require(['./components/course/ClassRecommendList'], resolve)
const TeacherSchedule = resolve => require(['./components/course/TeacherSchedule'], resolve)
const CampusSchedule = resolve => require(['./components/course/CampusSchedule'], resolve)
const BatchAdjustLectures = resolve => require(['./components/course/BatchAdjustLectures'], resolve)
const ReturnSetting = resolve => require(['./components/course/ReturnSetting'], resolve)



const SearchStudentList = resolve => require([ './components/enroll/SearchStudentList'], resolve)
const StudentForm = resolve => require([ './components/enroll/StudenForm'], resolve)
const StudentReg = resolve => require([ './components/enroll/StudentReg'], resolve)
const ClassHistoryList = resolve => require([ './components/enroll/ClassHistoryList'], resolve)
const StudentRefundList = resolve => require([ './components/enroll/StudentRefundList'], resolve)
const TurnClass = resolve => require([ './components/enroll/TurnClassStepOne'], resolve)
const StudentRegList = resolve => require(['./components/enroll/StudentRegList'], resolve)
const InvoiceManagement = resolve => require(['./components/enroll/InvoiceManagement'], resolve)
const EnrollPay = resolve => require(['./components/enroll/EnrollPay'], resolve)



const AccountList = resolve => require(['./components/settlement/AccountList'], resolve)
const AccountReportDetail = resolve => require(['./components/settlement/AccountReportDetail'], resolve)
const AccountMainBodyOfFee = resolve => require(['./components/settlement/AccountMainBodyOfFee'], resolve)
const FeeList = resolve => require(['./components/settlement/FeeList'], resolve)
const FeeForm = resolve => require(['./components/settlement/FeeForm'], resolve)
const ProfitReportDetail = resolve => require(['./components/settlement/ProfitReportDetail'], resolve)
const AccountWithdrawalList = resolve => require(['./components/settlement/AccountWithdrawalList'], resolve)
const WithdrawalList = resolve => require(['./components/settlement/WithdrawalList'], resolve)
const ApplyWithdrawalForm = resolve => require(['./components/settlement/ApplyWithdrawalForm'], resolve)
const FeeCategoryList = resolve => require(['./components/settlement/FeeCategoryList'], resolve)
const FeeCategoryForm = resolve => require(['./components/settlement/FeeCategoryForm'], resolve)
const IncomeCategoryList = resolve => require(['./components/settlement/IncomeCategoryList'], resolve)
const IncomeCategoryForm = resolve => require(['./components/settlement/IncomeCategoryForm'], resolve)










const SellerRegisterList = resolve => require(['./components/servicemanager/SellerRegisterList'], resolve)
const GoodsManagerList = resolve => require(['./components/servicemanager/GoodsManagerList'], resolve)
const LeaseManagerList = resolve => require(['./components/servicemanager/LeaseManagerList'], resolve)
const DemandManagerList = resolve => require(['./components/servicemanager/DemandManagerList'], resolve)
const OrderManagerList = resolve => require(['./components/servicemanager/OrderManagerList'], resolve)

const CategoryList = resolve => require([ './components/servicemanager/CategoryList'], resolve)
const CategoryEditForm = resolve => require([ './components/servicemanager/CategoryEditForm'], resolve)
const CategorySaveForm = resolve => require([ './components/servicemanager/CategorySaveForm'], resolve)


const AttendanceCourseClassList = resolve => require(['./components/attendance/AttendanceCourseClassList'], resolve)
const QueryAttendanceList = resolve => require(['./components/attendance/QueryAttendanceList'], resolve)
const ChangeClassList = resolve => require(['./components/attendance/ChangeClassList'], resolve)
const EarlyWarning = resolve => require(['./components/attendance/EarlyWarning'], resolve)
const ShiftClassList = resolve => require(['./components/attendance/ShiftClassList'], resolve)

const ChargeList = resolve => require(['./components/report/ChargeList'], resolve)
const CampusChargeList = resolve => require(['./components/report/CampusChargeList'], resolve)
const AggregationConsumeList = resolve => require(['./components/report/AggregationConsumeList'], resolve)
const ConsumeRecordList = resolve => require(['./components/report/ConsumeRecordList'], resolve)
const PayRecordList = resolve => require(['./components/report/PayRecordList'], resolve)
const InvoiceUsage = resolve => require(['./components/report/InvoiceUsage'], resolve)
const ConsumeCollectList = resolve => require(['./components/report/ConsumeCollectList'], resolve)
//营收预测
const incomePredict = resolve => require(['./components/report/incomePredict'], resolve)


const DiscountCategoryList = resolve => require(['./components/discount/DiscountCategoryList'], resolve)
const DiscountCategoryForm = resolve => require(['./components/discount/DiscountCategoryForm'], resolve)
const DiscountRuleList = resolve => require(['./components/discount/DiscountRuleList'], resolve)
const DiscountRuleForm = resolve => require(['./components/discount/DiscountRuleForm'], resolve)
const DiscountList = resolve => require(['./components/discount/DiscountList'], resolve)
const DiscountForm = resolve => require(['./components/discount/DiscountForm'], resolve)
const DiscountCode = resolve => require(['./components/discount/DiscountCode'], resolve)
const DiscountCodeForm = resolve => require(['./components/discount/DiscountCodeForm'], resolve)
const DiscountRuleTest = resolve => require(['./components/discount/DiscountRuleTest'], resolve)

const BusinessStatisticsList = resolve => require(['./components/operating/BusinessStatisticsList'], resolve)
const BusinessCostIncomeList = resolve => require(['./components/operating/BusinessCostIncomeList'], resolve)
const BusinessCostDetail = resolve => require(['./components/operating/BusinessCostDetail'], resolve)
const SubDetail = resolve => require(['./components/operating/SubDetail'], resolve)
const BusinessIncomeDetail = resolve => require(['./components/operating/BusinessIncomeDetail'], resolve)
const ProductCostIncomeList = resolve => require(['./components/operating/ProductCostIncomeList'], resolve)
const ProductCostDetail = resolve => require(['./components/operating/ProductCostDetail'], resolve)
const ProductIncomeDetail = resolve => require(['./components/operating/ProductIncomeDetail'], resolve)
const TeachReward = resolve => require(['./components/operating/TeachReward'], resolve)
const ProductStatisticsList = resolve => require(['./components/operating/ProductStatisticsList'], resolve)
const BasicData = resolve => require(['./components/operating/BasicData'], resolve)
const ProblemWarning = resolve => require(['./components/operating/ProblemWarning'], resolve)
const FullClassRate = resolve => require(['./components/operating/FullClassRate'], resolve)
const ExportSubjectCompleteRate = resolve => require(['./components/operating/ExportSubjectCompleteRate'], resolve)
const SubjectCompleteRate = resolve => require(['./components/operating/SubjectCompleteRate'], resolve)
const DataAnalysisList = resolve => require(['./components/operating/DataAnalysisList'], resolve)
const CourseTarget = resolve => require(['./components/operating/CourseTarget'], resolve)
const TargetSet = resolve => require(['./components/operating/TargetSet'], resolve)
const TeacherTarget = resolve => require(['./components/operating/TeacherTarget'], resolve)
const ProductTarget = resolve => require(['./components/operating/ProductTarget'], resolve)
const SubjectTarget = resolve => require(['./components/operating/SubjectTarget'], resolve)
const MainAccountTarget = resolve => require(['./components/operating/MainAccountTarget'], resolve)
const Consultant = resolve => require(['./components/operating/Consultant'], resolve)
const CounselorBranchRate = resolve => require(['./components/operating/CounselorBranchRate'], resolve)
const CounselorBranchRateDetail = resolve => require(['./components/operating/CounselorBranchRateDetail'], resolve)
const SeniorBranchBonus = resolve => require(['./components/operating/SeniorBranchBonus'], resolve)
const ClassComletionRate = resolve => require(['./components/operating/ClassComletionRate'], resolve)
const ClassLectureGroupDetail = resolve => require(['./components/operating/ClassLectureGroupDetail'], resolve)
const TeacherRecord = resolve => require(['./components/operating/TeacherRecord'], resolve)
const classTimeRecord = resolve => require(['./components/operating/classTimeRecord'], resolve)
const GradeCompletion = resolve => require(['./components/operating/GradeCompletion'], resolve)
const Block = resolve => require(['./components/operating/Block'], resolve)
const OnlineList = resolve => require(['./components/operating/OnlineList'], resolve)
const MessageTable = resolve => require(['./components/operating/MessageTable'], resolve)
const EverySituation = resolve => require(['./components/operating/EverySituation'], resolve)
const returns = resolve => require(['./components/operating/returns'], resolve)
const returnsDetail = resolve => require(['./components/operating/returnsDetail'], resolve)
const BusinessSituation = resolve => require(['./components/operating/BusinessSituation'], resolve)
const SeniorComletionRate = resolve => require(['./components/operating/SeniorComletionRate'], resolve)

const GradeSubjectStatisticsList = resolve => require(['./components/operating/GradeSubjectStatisticsList'], resolve)
const GradeSubjectCostIncomeList = resolve => require(['./components/operating/GradeSubjectCostIncomeList'], resolve)
const GradeSubjectCostDetail = resolve => require(['./components/operating/GradeSubjectCostDetail'], resolve)
const GradeSubjectIncomeDetail = resolve => require(['./components/operating/GradeSubjectIncomeDetail'], resolve)
const ClassRegDetail = resolve => require(['./components/operating/ClassRegDetail'], resolve)
const ExternalCampusReg = resolve => require(['./components/operating/ExternalCampusReg'], resolve)
const ExternalSeniorReg = resolve => require(['./components/operating/ExternalSeniorReg'], resolve)
const PromotionNumber = resolve => require(['./components/operating/PromotionNumber'], resolve)
const PromotionDetail = resolve => require(['./components/operating/PromotionDetail'], resolve)
const DiscountCodeUsage = resolve => require(['./components/operating/DiscountCodeUsage'], resolve)
const refundBonusPerson = resolve => require(['./components/operating/refundBonusPerson'], resolve)
const teacherTeachDetail =  resolve => require(['./components/operating/teacherTeachDetail'], resolve)
const teacherSubjectContinueRate =  resolve => require(['./components/operating/teacherSubjectContinueRate'], resolve)
const subjectContinueRate =  resolve => require(['./components/operating/subjectContinueRate'], resolve)

const Withdrawal = resolve => require(['./components/balance/Withdrawal'], resolve)
const Transfer = resolve => require(['./components/balance/Transfer'], resolve)
const OutTransfer = resolve => require(['./components/balance/OutTransfer'], resolve)
const RechargeManage = resolve => require(['./components/balance/RechargeManage'], resolve)
const StudentBalance = resolve => require(['./components/balance/StudentBalance'], resolve)

const ResearchSetting = resolve => require(['./components/research/Setting'], resolve)
const NewSetting = resolve => require(['./components/research/NewSetting'], resolve)
const ChooseQuestion = resolve => require(['./components/research/ChooseQuestion'], resolve)
const QuestionnaireList = resolve => require(['./components/research/QuestionnaireList'], resolve)
const NewQuestion = resolve => require(['./components/research/NewQuestion'], resolve)
const ImportResult = resolve => require(['./components/research/ImportResult'], resolve)
const ResultList = resolve => require(['./components/research/ResultList'], resolve)
const Import = resolve => require(['./components/research/Import'], resolve)
const CreateEditQuestion = resolve => require(['./components/research/CreateEditQuestion'], resolve)

// 潜客管理
const crmConfig = resolve => require(['./components/potentialcustomer/Config'], resolve)
const crmConfigSet = resolve => require(['./components/potentialcustomer/ConfigSet'], resolve)
const crmCategory = resolve => require(['./components/potentialcustomer/Category'], resolve)
const crmAddBigCategory = resolve => require(['./components/potentialcustomer/AddBigCategory'], resolve)
const crmAddSmallCategory = resolve => require(['./components/potentialcustomer/AddSmallCategory'], resolve)
const crmImport = resolve => require(['./components/potentialcustomer/Import'], resolve)
const crmStat = resolve => require(['./components/potentialcustomer/Stat'], resolve)
const crmProgress = resolve => require(['./components/potentialcustomer/Progress'], resolve)
const crmVisit = resolve => require(['./components/potentialcustomer/Visit'], resolve)
const crmDashboard = resolve => require(['./components/potentialcustomer/Dashboard'], resolve)
const crmDispatch = resolve => require(['./components/potentialcustomer/Dispatch'], resolve)
const crmUndistributed = resolve => require(['./components/potentialcustomer/Undistributed'], resolve)
const crmUnFollow = resolve => require(['./components/potentialcustomer/UnFollow'], resolve)
const crmTimeOut = resolve => require(['./components/potentialcustomer/TimeOut'], resolve)
const crmSms = resolve => require(['./components/potentialcustomer/Sms'], resolve)
const crmSmsForm = resolve => require(['./components/potentialcustomer/SmsForm'], resolve)
const crmDepartment = resolve => require(['./components/potentialcustomer/Department'], resolve)
const crmDepartmentDistribute = resolve => require(['./components/potentialcustomer/DepartmentDistribute'], resolve)
const crmAddDepartment = resolve => require(['./components/potentialcustomer/AddDepartment'], resolve)
const crmResourceDetail = resolve => require(['./components/potentialcustomer/ResourceDetail'], resolve)
const crmFirstRegSituation = resolve => require(['./components/potentialcustomer/FirstRegSituation'], resolve)
const crmResourceRecycle = resolve => require(['./components/potentialcustomer/ResourceRecycle'], resolve)
const crmMyVisitDetail = resolve => require(['./components/potentialcustomer/MyVisitDetail'], resolve)

// 薪酬模块
const TeacherCommission = resolve => require(['./components/wage/TeacherCommission'], resolve)
const WageConfirm = resolve => require(['./components/wage/WageConfirm'], resolve)
const CoefficientPerformance = resolve => require(['./components/wage/CoefficientPerformance'], resolve)

// 网报管理
const StudentScore = resolve => require(['./components/online/StudentScore'], resolve)
const DegreeOrder = resolve => require(['./components/online/DegreeOrder'], resolve)
const PublicPictureSetting = resolve => require(['./components/online/PublicPictureSetting'], resolve)
const AddPublicPicture = resolve => require(['./components/online/AddPublicPicture'], resolve)
const ShowSetting = resolve => require(['./components/online/ShowSetting'], resolve)
const SortSetting = resolve => require(['./components/online/SortSetting'], resolve)
const EditShowSetting = resolve => require(['./components/online/EditShowSetting'], resolve)
const setAdjustClass = resolve => require(['./components/online/setAdjustClass'], resolve)
const BindStudent = resolve => require(['./components/online/BindStudent'], resolve)
const EditorBingStudent = resolve => require(['./components/online/EditorBingStudent'], resolve)
const Feedback = resolve => require(['./components/online/Feedback'], resolve)
const SpecialUrl = resolve => require(['./components/online/SpecialUrl'], resolve)
const DegreeSubscribe = resolve => require(['./components/online/DegreeSubscribe'], resolve)
const ShoppingCartSituation = resolve => require(['./components/online/ShoppingCartSituation'], resolve)
// 分段设置
const chargeSetting = resolve => require(['./components/online/chargeSetting'], resolve)


// 家校沟通
const Communication = resolve => require(['./components/studentschool/Communication'], resolve)
const CommunicationReg = resolve => require(['./components/studentschool/CommunicationReg'], resolve)
const CommunicationHistory = resolve => require(['./components/studentschool/CommunicationHistory'], resolve)
const CommunicationSituation = resolve => require(['./components/studentschool/CommunicationSituation'], resolve)

// 新增班级申请
const applyClass = resolve => require(['./components/course/applyClass'], resolve)

// 活动列表
const activityList = resolve => require(['./components/activity/activityList'], resolve)
const activityEdit = resolve => require(['./components/activity/activityEdit'], resolve)
// 查看数据
const viewData = resolve => require(['./components/activity/viewData'], resolve)
// 查看目标设置
const targetSetting = resolve => require(['./components/activity/targetSetting'], resolve)
const inventorySetting = resolve => require(['./components/activity/inventorySetting'], resolve)
const campusInventory = resolve => require(['./components/activity/campusInventory'], resolve)

Vue.use(VueRouter)
Vue.use(VueUI)
Vue.use(vueUIExtend)
Vue.use(VueResource)

// const Index = { template: '<div><img src="./assets/img/bg-00.jpg" /></div>' }


const router = new VueRouter({
  routes:[{
    path: '/main',
    component: Main,
    children:[
      {path: 'measurement/exam/paper' , component: Paper },
      {path: 'measurement/exam/bingPaper' , component: bingPaper },
      {path: 'measurement/exam/add' , component: PaperForm },
      {path: 'measurement/exam/addTopic' , component: TopicForm },
      {path: 'measurement/test/setting' , component: Measure },
      {path: 'measurement/test/add' , component: MeasureForm },
      {path: 'measurement/test/measureWhitelist' , component: MeasureWhitelist },
      {path: 'sys/invoice/invoiceMainPartList' , component: InvoiceMainPartList },
      {path: 'sys/invoice/invoiceMainPartForm' , component: InvoiceMainPartForm },
      {path: 'sys/user/profile' , component: UserProfile },
      {path: 'sys/user/list' , component: UserList },
      {path: 'sys/user/add' , component: UserForm },
      {path: 'sys/user/edit/:userId' , component: UserForm },
      {path: 'sys/user/roles/:userId' , component: UserRoles },
      {path: 'sys/role/list' , component: RoleList },
      {path: 'sys/role/add' , component: RoleForm },
      {path: 'sys/role/edit/:roleId' , component: RoleForm },
      {path: 'sys/role/optPermission/:roleId' , component: RoleOptPermission },
      {path: 'sys/role/dataPermission/:userId' , component: DataPermission },
      {path: 'sys/role/users/:roleId' , component: RoleUsers },
      {path: 'sys/areateam/list' , component: AreaTeamList },
      {path: 'sys/areateam/add' , component: AreaTeamForm },
      {path: 'sys/areateam/edit/:areaTeamId' , component: AreaTeamForm },
      {path: 'sys/busteam/list' , component: BusTeamList },
      {path: 'sys/busteam/add' , component: BusTeamForm },
      {path: 'sys/busteam/edit/:busTeamId' , component: BusTeamForm },
      {path: 'sys/period/list' , component: PeriodList },
      {path: 'sys/period/add' , component: PeriodForm },
      {path: 'sys/period/edit/:periodId' , component: PeriodForm },
      {path: 'sys/period/continueApplySet/:periodId' , component: ContinueApplySet },
      {path: 'sys/period/startDaySetting/:periodId' , component: StartDaySetting },
      {path: 'sys/teacher/list' , component: TeacherList },
      {path: 'sys/teacher/add' , component: TeacherForm },
      {path: 'sys/teacher/edit/:teacherId' , component: TeacherForm },
      {path: 'sys/campus/list' , component: CampusList },

      {path: 'sys/audit/campus/list' , component: CampusAuditList },
      {path: 'sys/edit/campus/:campusId' , component: CampusEditForm },
      {path: 'sys/campus/new/add' , component: CampusEditForm },

      {path: 'sys/campus/add' , component: CampusForm },
      {path: 'sys/campus/edit/:campusId' , component: CampusForm },
      {path: 'sys/room/list' , component: RoomList },
      {path: 'sys/room/add' , component: RoomForm },
      {path: 'sys/room/edit/:roomId' , component: RoomForm },

      {path: 'sys/room/new/list' , component: RoomNewList },
      {path: 'sys/room/new/add' , component: RoomNewForm },
      {path: 'sys/room/new/edit/:roomId' , component: RoomNewForm },

      {path: 'sys/cusId/list' , component: CusIdList },
      {path: 'sys/cusId/edit/:campusId' , component: CusIdForm },

      {path: 'sys/student/school/list' , component: StudentSchoolList },
      {path: 'sys/student/school/add' , component: StudentSchoolForm },
      {path: 'sys/student/school/edit/:studentSchoolId' , component: StudentSchoolForm },
      {path: 'sys/class/remuneration/list' , component: ClassRemunerationList },
      {path: 'sys/class/remuneration/add' , component: ClassRemunerationForm },
      {path: 'sys/class/remuneration/edit/:classRemunerationId' , component: ClassRemunerationForm },
      {path: 'sys/vacation/setting' , component: SummerWinter },
      {path: 'sys/vacation/add' , component: SummerWinterForm },

      {path: 'course/course/list' , component: CourseList },
      {path: 'course/course/add' , component: CourseForm },
      {path: 'course/course/edit/:courseId' , component: CourseForm },
      {path: 'course/courseType/list' , component: CourseTypeList },
      {path: 'course/courseType/add' , component: CourseTypeForm },
      {path: 'course/courseType/edit/:courseTypeId/:name', component:CourseTypeForm },
      {path: 'course/product/list',  component:  ProductList},
      {path: 'product/product/add' , component: ProductForm },
      {path: 'product/product/edit/:productId' , component: ProductForm },
      {path: 'course/teacher/schedule' , component: TeacherSchedule },
      {path: 'course/campus/schedule' , component: CampusSchedule },
      {path: 'batchAdjustLectures' , component: BatchAdjustLectures },
      {path: 'applyClass', component: applyClass},
      {path: 'course/class/list' , component: ClassList },
      {path: 'course/class/add' , component: ClassForm},
      {path: 'course/class/edit/:classId' , component: ClassForm },
      {path: 'course/class/time/:classId' , component: ClassTimeList },
      {path: 'course/class/returnSetting' , component: ReturnSetting },

      {path: 'course/class/recommend/list' , component: ClassRecommendList },


      // {path: 'enroll/student/search' , component: SearchStudentList },
      {path: 'enroll/student/search' , component: EnrollPay },
      {path: 'enroll/student/search/:studentId' , component: EnrollPay },
      {path: 'enroll/student/reg' , component: StudentReg },
      {path: 'enroll/student/add' , component: StudentForm },
      {path: 'enroll/student/edit/:studentId' , component: StudentForm },

      {path: 'enroll/student/reg/:studentId' , component: StudentReg },

      {path: 'enroll/student/reg/query/list' , component: StudentRegList },


      {path: 'enroll/ClassHistoryList', component:ClassHistoryList},
      {path: 'enroll/student/studentRefundList', component:StudentRefundList},
      {path: 'enroll/student/turnClass', component:TurnClass},
      {path: 'enroll/student/invoiceList', component:InvoiceManagement},



      {path: 'settlement/account/list' , component: AccountList },
      {path: 'settlement/account/report/detail/:subject/:mainAccountId' , component: AccountReportDetail },
      {path: 'settlement/fee/accountmainbody' , component: AccountMainBodyOfFee },
      {path: 'settlement/fee/list/:mainAccountId' , component: FeeList },
      {path: 'settlement/fee/add/:mainAccountId' , component: FeeForm },
      {path: 'settlement/fee/edit/:mainAccountId/:feeId' , component: FeeForm },
      {path: 'settlement/account/report/profit/:mainAccountId' , component: ProfitReportDetail },
      {path: 'settlement/account/withdrawal/list/:mainAccountId' , component: AccountWithdrawalList },
      {path: 'settlement/account/withdrawal/apply/:mainAccountId' , component: ApplyWithdrawalForm },
      {path: 'settlement/withdrawal/list' , component: WithdrawalList },
      {path: 'settlement/feeCategory/list',  component:  FeeCategoryList},
      {path: 'settlement/feeCategory/add' , component: FeeCategoryForm },
      {path: 'settlement/feeCategory/edit/:feeCategoryId' , component: FeeCategoryForm },
      {path: 'settlement/incomeCategory/list',  component:  IncomeCategoryList},
      {path: 'settlement/incomeCategory/add' , component: IncomeCategoryForm },
      {path: 'settlement/incomeCategory/edit/:incomeCategoryId' , component: IncomeCategoryForm },


      {path: 'serviceManager/category/list' , component: CategoryList },
      {path: 'serviceManager/category/add' , component: CategorySaveForm},
      {path: 'serviceManager/category/edit/:categoryId' , component: CategoryEditForm },

      {path: 'serviceManager/goods/list', component:GoodsManagerList},
      {path: 'serviceManager/lease/list', component:LeaseManagerList},
      {path: 'serviceManager/demand/list', component:DemandManagerList},
      {path: 'serviceManager/order/list', component:OrderManagerList},
      {path: 'serviceManager/sellerRegister/list', component:SellerRegisterList},

      {path: 'attendance/attendance/list', component:AttendanceCourseClassList },
      {path: 'attendance/attendanceQuery/list', component:QueryAttendanceList },
      {path: 'attendance/changeClass/list', component:ChangeClassList },
      {path: 'attendance/warning/list', component:EarlyWarning },
      {path: 'attendance/shift/list', component:ShiftClassList },

      {path: 'report/charge/list', component:ChargeList },
      {path: 'report/campus/charge/list', component:CampusChargeList },
      {path: 'report/consumeAggregation/list', component:AggregationConsumeList },
      {path: 'report/consumeRecord/list', component:ConsumeRecordList },
      {path: 'report/payRecord/list', component:PayRecordList },
      {path: 'report/invoiceUsage', component:InvoiceUsage },
      {path: 'report/consumeCollect/list', component:ConsumeCollectList },
      {path: 'report/incomePredict/list', component:incomePredict },


      {path: 'discount/category/list' , component: DiscountCategoryList },
      {path: 'discount/category/add' , component: DiscountCategoryForm},
      {path: 'discount/category/edit/:discountCategoryId' , component: DiscountCategoryForm},

      {path: 'discount/rule/list' , component: DiscountRuleList },
      {path: 'discount/rule/add' , component: DiscountRuleForm},
      {path: 'discount/rule/edit/:discountRuleId' , component: DiscountRuleForm},
      {path: 'discount/rule/test/:discountRuleId' , component: DiscountRuleTest},

      {path: 'discount/discount/list' , component: DiscountList },
      {path: 'discount/discount/add' , component: DiscountForm},
      {path: 'discount/discount/edit/:discountId' , component: DiscountForm},

      {path: 'discount/discountCode/list' , component: DiscountCode },
      {path: 'discount/discountCode/add' , component: DiscountCodeForm},

      {path: 'operating/businessStatistics/list' , component: BusinessStatisticsList},
      {path: 'operating/businessStatistics/costIncomeList' , component: BusinessCostIncomeList},
      {path: 'operating/businessStatistics/costDetail' , component: BusinessCostDetail},
      {path: 'operating/businessStatistics/subDetail' , component: SubDetail},
      {path: 'operating/businessStatistics/incomeDetail' , component: BusinessIncomeDetail},
      {path: 'operating/businessStatistics/teachReward' , component: TeachReward},
      {path: 'operating/productStatistics/list' , component: ProductStatisticsList},
      {path: 'operating/productStatistics/costIncomeList' , component: ProductCostIncomeList},
      {path: 'operating/productStatistics/costDetail' , component: ProductCostDetail},
      {path: 'operating/productStatistics/incomeDetail' , component: ProductIncomeDetail},
      {path: 'operating/productStatistics/subDetail' , component: SubDetail},
      {path: 'operating/gradeSubjectStatistics/list' , component: GradeSubjectStatisticsList},
      {path: 'operating/gradeSubjectStatistics/costIncomeList' , component: GradeSubjectCostIncomeList},
      {path: 'operating/gradeSubjectStatistics/costDetail' , component: GradeSubjectCostDetail},
      {path: 'operating/gradeSubjectStatistics/incomeDetail' , component: GradeSubjectIncomeDetail},
      {path: 'operating/gradeSubjectStatistics/subDetail' , component: SubDetail},
      {
        path: 'operating/dataAnalysis/list' ,
        component: DataAnalysisList,
        children: [
          {path: 'basicData' , component: BasicData},
          {path: 'problemWarning' , component: ProblemWarning},
          {path: 'fullClassRate' , component: FullClassRate},
          {path: 'subjectCompleteRate' , component: SubjectCompleteRate},
        ]
      },
      {path: 'operating/dataAnalysis/list/exportSubjectCompleteRate' , component: ExportSubjectCompleteRate},
      {path: 'operating/targetSet' , component: TargetSet},
      {path: 'operating/targetSet/mainAccountTarget' , component: MainAccountTarget},
      {path: 'operating/targetSet/productTarget' , component: ProductTarget},
      {path: 'operating/targetSet/teacherTarget' , component: TeacherTarget},
      {path: 'operating/targetSet/courseTarget' , component: CourseTarget},
      {path: 'operating/targetSet/subjectTarget' , component: SubjectTarget},

      {path: 'operating/counselorBranchBonus' , component: Consultant},
      {path: 'operating/counselorBranchRate' , component: CounselorBranchRate},
      {path: 'operating/counselorBranchRateDetail' , component: CounselorBranchRateDetail},
      {path: 'operating/seniorBranchBonus' , component: SeniorBranchBonus},
      {path: 'operating/classComletionRate' , component: ClassComletionRate},
      {path: 'operating/classLectureGroupDetail' , component: ClassLectureGroupDetail},
      {path: 'operating/teacherRecord' , component: TeacherRecord},
      {path: 'operating/lectureRecord' , component: classTimeRecord},
      {path: 'operating/gradeCompletion' , component: GradeCompletion},
      {path: 'operating/block' , component: Block},
      {path: 'operating/OnlineList' , component: OnlineList},
      {path: 'operating/smsList' , component: MessageTable},
      {path: 'operating/everySituation' , component: EverySituation},
      {path: 'operating/refundSituation' , component: returns},
      {path: 'operating/refundDetail' , component: returnsDetail},
      {path: 'operating/businessSituation' , component: BusinessSituation},
      {path: 'operating/seniorComletionRate' , component: SeniorComletionRate},
      {path: 'operating/classRegDetail' , component: ClassRegDetail},
      {path: 'operating/externalCampusReg' , component: ExternalCampusReg},
      {path: 'operating/externalSeniorReg' , component: ExternalSeniorReg},
      {path: 'operating/academicAdvisorData' , component: PromotionNumber},
      {path: 'operating/promotionDetail' , component: PromotionDetail},
      {path: 'operating/discountCodeUsage' , component: DiscountCodeUsage},
      // 退费扣除
      {path: 'operating/refundBonusPerson' , component: refundBonusPerson},
      {path: 'operating/dataAnalysis/list/teacherTeachDetail' , component: teacherTeachDetail},
      {path: 'operating/dataAnalysis/list/teacherSubjectContinueRate' , component: teacherSubjectContinueRate},
      {path: 'operating/dataAnalysis/list/subjectContinueRate' , component: subjectContinueRate},

      {path: 'balance/withdrawal/list' , component: Withdrawal},
      {path: 'balance/transfer/list' , component: Transfer},
      {path: 'balance/outTransfer/list' , component: OutTransfer},
      {path: 'balance/rechargeList' , component: RechargeManage},
      {path: 'balance/studentBalance' , component: StudentBalance},

      // 调研
      {path: 'research/questionnaireSetting' , component: ResearchSetting},
      {path: 'research/newSetting' , component: NewSetting},
      {path: 'research/chooseQuestion' , component: ChooseQuestion},
      {path: 'research/questionnaireList' , component: QuestionnaireList},
      {path: 'research/newQuestion' , component: NewQuestion},
      {path: 'research/importResult' , component: ImportResult},
      {path: 'research/result' , component: ResultList},
      {path: 'research/import' , component: Import},
      {path: 'research/createEditQuestion' , component: CreateEditQuestion},
      // 潜客管理
      {path: 'crm/config' , component: crmConfig},
      {path: 'crm/configSet' , component: crmConfigSet},
      {path: 'crm/category' , component: crmCategory},
      {path: 'crm/addBigCategory' , component: crmAddBigCategory},
      {path: 'crm/import' , component: crmImport},
      {path: 'crm/addSmallCategory' , component: crmAddSmallCategory},
      {path: 'crm/stat' , component: crmStat},
      {path: 'crm/progress' , component: crmProgress},
      {path: 'crm/visit' , component: crmVisit},
      {path: 'crm/dashboard' , component: crmDashboard},
      {path: 'crm/dispatch' , component: crmDispatch},
      {path: 'crm/undistributed' , component: crmUndistributed},
      {path: 'crm/unFollow' , component: crmUnFollow},
      {path: 'crm/timeOut' , component: crmTimeOut},
      {path: 'crm/sms' , component: crmSms},
      {path: 'crm/smsForm' , component: crmSmsForm},
      {path: 'crm/department' , component: crmDepartment},
      {path: 'crm/departmentDistribution' , component: crmDepartmentDistribute},
      {path: 'crm/department/add' , component: crmAddDepartment},
      {path: 'crm/resourceDetail' , component: crmResourceDetail},
      {path: 'crm/firstRegSituation' , component: crmFirstRegSituation},
      {path: 'crm/resourceRecycle' , component: crmResourceRecycle},
      {path: 'crm/myVisitDetail' , component: crmMyVisitDetail},

      // 薪酬模块
      {path: 'wage/teacherCommission' , component: TeacherCommission},
      {path: 'wage/wageConfirm' , component: WageConfirm},
      {path: 'wage/coefficientPerformance' , component: CoefficientPerformance},

      // 网报管理
      {path: 'online/studentScore' , component: StudentScore},
      // {path: 'online/xxx/sss' , component: DegreeOrder},
      {path: 'online/publicPictureSetting' , component: PublicPictureSetting},
      {path: 'online/addPublicPicture' , component: AddPublicPicture},
      {path: 'online/showSetting' , component: ShowSetting},
      // {path: 'online/xxx/sss/xxx' , component: SortSetting},
      {path: 'online/editShowSetting' , component: EditShowSetting},
      {path: 'online/changeState' , component: setAdjustClass},
      {path: 'online/bindStudent' , component: BindStudent},
      {path: 'online/editorBingStudent' , component: EditorBingStudent},
      {path: 'online/feedback' , component: Feedback},
      {path: 'online/specialUrl' , component: SpecialUrl},
      {path: 'online/degreeSubscribe' , component: DegreeSubscribe},
      {path: 'online/shoppingCartSituation' , component: ShoppingCartSituation},
      // 分段设置
      {path: 'online/chargeSetting' , component: chargeSetting},


      // 家校沟通
      {path: 'school/communication' , component: Communication},
      {path: 'school/communication/reg' , component: CommunicationReg},
      {path: 'communication/history' , component: CommunicationHistory},
      {path: 'communication/situation' , component: CommunicationSituation},
      // 活动列表
      {path: 'activity/list' , component: activityList},
      {path: 'activity/add' , component: activityEdit},
      {path: 'activity/edit/:id' , component: activityEdit},
      // 查看数据
      {path: 'activity/viewData/:id' , component: viewData},
      // 活动目标设置
      {path:'activity/targetSetting', component: targetSetting},
      // 库存设置
      {path: 'activity/inventorySetting', component: inventorySetting},
      {path: 'activity/campusInventory', component: campusInventory}
    ],
    beforeEnter:function(to, from, next){
      if(!storage.getLogin()){
        next('/login')
      }else{
        next()
      }

    }
  }, {
      path: '/index' , component: Index
    },{
    path: '/login',
    component: Login
  },{
    path: '/enroll',
    component: Enroll
  },{
    path:'/',
    redirect:'/login'
  },{
    path:'*',
    component:NotFound
  }]
})

let globalInterval = setInterval(function () {
  let nowTime = moment(new Date().getTime()).unix() // 取秒
  let lastTime = storage.getOptingTime() ? moment(Number(storage.getOptingTime())).unix() : nowTime
  if ((nowTime - lastTime) > 900 && location.href.indexOf('/login') === -1) {
    clearInterval(globalInterval)
    storage.setLogin(null)
    storage.setAccessToken(null)
    location.href = '/'
  }
},60000)
var appVue = new Vue({
  el: '#app',
  router,
  template: '<div><router-view class="view"></router-view></div>',
  data:{ config: {menus:[],permission:{},groupBusTeams:{},areaTeams:[],grades:[],subjects:[],periods:[],campusList:[]} , courseShoppingCart:[], teacherName:[]},

})


console.log('-------------------------------------')

